<template>
  <div class="header">
  	<div class="header-title">
  		<span class="header-title-image"></span>
  		<span class="header-title-text">青田气象灾害信息共享平台</span>
  	</div>
  	<div class="header-choose">
  		<router-link v-for="(item, index) in headerChoose" :key="index" :to="{path: item.path}" active-class="active" tag="div">{{ item.name }}</router-link>
  	</div>
  	<div class="header-admin">
  		<div>
  			账户设置
  		</div>
  		<div>
  			退出登录
  		</div>
  	</div>
  </div>
</template>

<script>
export default {
	data() {
		return {
			headerChoose: [
				{
					name: "首页",
					path: "index",
					active: true
				},
				{
					name: "监测",
					path: "monitor",
					active: false
				},
				{
					name: "报警阈值管理",
					path: "alarm",
					active: false
				},
				{
					name: "发布通知",
					path: "deliver",
					active: false
				},
				{
					name: "用户权限管理",
					path: "user",
					active: false
				}
			]
		}
	}
}
</script>

<style lang="less">
.header{
	height: 50px;
	line-height: 50px;
	background: #082946;
	color: #fff;
	padding: 0 10px;
	border-bottom: 1px solid #263B76;
	.header-title{
		float: left;
		.header-title-image{
			display: inline-block;
			width: 30px;
			height: 30px;
			line-height: 30px;
			background: url('../assets/images/zuhu_logo.png') no-repeat;
			background-size: cover;
			vertical-align: middle;
		}
		.header-title-text{
			font-size: 16px;
    		margin-left: 10px;
		}
	}
	.header-choose{
		margin-left: 10px;
		float: left;
		div{
			float: left;
			width: 130px;
			text-align: center;
			cursor: pointer;
			font-size: 15px;
			&:hover{
				background: #1A219D;
				box-shadow: 0 5px 10px #7279BF inset;
			}
			&.active{
				background: #1A219D;
				box-shadow: 0 5px 10px #7279BF inset;
				color: #05DDFE;
			}
		}
	}
	.header-admin{
		float: right;
		& > div{
			float: left;
			margin-left: 10px;
			cursor: pointer;
		}
	}
}
</style>
